package com.evo.chat.common.exception;

import com.evo.chat.common.ResultEnum;

/**
 * 自定义异常
 * @author luwenzheng
 * date 2020-02-05
 */
public class ChatException extends RuntimeException {

    private Integer code;

    public ChatException(ResultEnum message) {
        super(message.getMsg());
        this.code = message.getCode();
    }

    public ChatException(ResultEnum message, String errorMsg) {
        super(errorMsg);
        this.code = message.getCode();
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }
}
